package com.beiding.v2.test.pg;

import com.beiding.v2.base.IContext;
import com.beiding.v2.base.IUnit;
import com.beiding.v2.base.IUnitHandler;
import com.beiding.v2.element.IKeyword;

public class KeyWordHandler implements IUnitHandler<IKeyword> {

    @Override
    public boolean canHandle(IUnit unit) {
        return unit instanceof IKeyword;
    }

    @Override
    public String handle(IContext context, IKeyword unit) {
        return unit.getKeyword().getText().toUpperCase();
    }

}
